.class public Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;
.super Landroid/widget/BaseAdapter;
.source "UpUserAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mContext:Landroid/content/Context;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mUsers:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/CommonUserModel;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .registers 6
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/CommonUserModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "users":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/CommonUserModel;>;"
    const v2, 0x7f02010e

    const/4 v1, 0x1

    .line 29
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 30
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mContext:Landroid/content/Context;

    .line 31
    iput-object p2, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mUsers:Ljava/util/List;

    .line 33
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 34
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 35
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 36
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 37
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 38
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 39
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 40
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 41
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 42
    return-void
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 46
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mUsers:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 51
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mUsers:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 56
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 10
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    const/4 v5, 0x0

    .line 62
    if-nez p2, :cond_76

    .line 63
    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mContext:Landroid/content/Context;

    const v3, 0x7f030086

    invoke-static {v2, v3, v5}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 65
    new-instance v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;-><init>(Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;)V

    .line 66
    .local v0, "holder":Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;
    const v2, 0x7f0a00bb

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    .line 67
    const v2, 0x7f0a0099

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    .line 68
    const v2, 0x7f0a01cf

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->description:Landroid/widget/TextView;

    .line 70
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 75
    :goto_35
    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mUsers:Ljava/util/List;

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/model/CommonUserModel;

    .line 76
    .local v1, "user":Lcom/brixd/niceapp/model/CommonUserModel;
    iget-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 77
    iget-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->description:Landroid/widget/TextView;

    invoke-virtual {v1}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserIntro()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 79
    invoke-virtual {v1}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserIdentity()I

    move-result v2

    const/4 v3, 0x1

    if-ne v2, v3, :cond_7d

    .line 80
    iget-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f02018a

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-virtual {v2, v5, v5, v3, v5}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 85
    :goto_68
    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v1}, Lcom/brixd/niceapp/model/CommonUserModel;->getAvatarUrl()Ljava/lang/String;

    move-result-object v3

    iget-object v4, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userAvatar:Landroid/widget/ImageView;

    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v2, v3, v4, v5}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 86
    return-object p2

    .line 72
    .end local v0    # "holder":Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;
    .end local v1    # "user":Lcom/brixd/niceapp/model/CommonUserModel;
    :cond_76
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;

    .restart local v0    # "holder":Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;
    goto :goto_35

    .line 82
    .restart local v1    # "user":Lcom/brixd/niceapp/model/CommonUserModel;
    :cond_7d
    iget-object v2, v0, Lcom/brixd/niceapp/userinfo/adapter/UpUserAdapter$ViewHolder;->userName:Landroid/widget/TextView;

    invoke-virtual {v2, v5, v5, v5, v5}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    goto :goto_68
.end method
